package com.danskin.wechat.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.danskin.wechat.entity.CustActivityApply;
import com.danskin.wechat.entity.example.CustActivityApplyExample;
import com.danskin.wechat.util.Page;

public interface CustActivityApplyDao {

	void insertCustActivityApply(CustActivityApply custActivityApply);

	List<CustActivityApply> findCustActivityApplyValidate();

	List<Integer> queryCustActivityApply(@Param("custExId")Integer custExId, @Param("activityId")String activityId);

	List<CustActivityApply> findCustActivityApplyId(@Param("id")Integer id);
	
	
	int countByExample(CustActivityApplyExample example);

    int deleteByExample(CustActivityApplyExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(CustActivityApply record);

    int insertSelective(CustActivityApply record);

    List<CustActivityApply> selectByExample(CustActivityApplyExample example);

    CustActivityApply selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") CustActivityApply record, @Param("example") CustActivityApplyExample example);

    int updateByExample(@Param("record") CustActivityApply record, @Param("example") CustActivityApplyExample example);

    int updateByPrimaryKeySelective(CustActivityApply record);

    int updateByPrimaryKey(CustActivityApply record);
    
    //根据活动id查询   报名该活动下报名人数
    Map<String,Integer> selectActivityCountByActivityId(Map<String,Object> map);
    
    //查询我的活动列表
    List<Map<String,Object>> listPageMyActivityListByOpenId(Page page);
    
    //查询我的活动总数
    List<Map<String,Object>> selectMyActivityListByOpenId(Map<String,Object> map);
    
    List<Map<String,Object>> listPageActivityApplyStatic(Page page);

}
